<!--
/**
 * moOde audio player (C) 2014 Tim Curtis
 * http://moodeaudio.org
 *
 * This Program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 *
 * This Program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * 汉化：Androidnews
 */
-->
<div id="container">
<div class="container">
	<h1 class="sys-config">GPIO控制</h1>

	<form class="form-horizontal" action="" method="post">
		<legend>设置
			<button class="legend-config btn btn-medium btn-primary btn-submit" type="submit" name="save" value="1">保存</button>
		</legend>

		<p class="sub-legend">
			使用逗号分隔命令(Cmd)字段中的参数，例如[mpc，load，My Playlist]。
			GPIO引脚配置为输入/上拉，为3V3。引脚GPIO2和GPIO3具有固定的上拉电阻。
			上电时，引脚设置为输入模式，GPIO0-GPIO8上拉至3V3，GPIO9-GPIO27下拉至0V。
			<a href="images/gpio-pinout.jpg" class="target-blank-link" target="_blank">GPIO引脚排列图</a>
		</p>

		<div class="control-group">
			<label class="control-label" for="sw_1_pin">Button 1</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-1-onoff-2">开</label>$_select[sw_1_onoff_on]
					<label class="toggle-radio" for="toggle-sw-1-onoff-1">关</label>$_select[sw_1_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_1_pin" name="config[1][pin]" value="$_select[sw_1_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_1_cmd" name="config[1][command]" value="$_select[sw_1_cmd]">
			</div>

			<label class="control-label" for="sw_2_pin">Button 2</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-2-onoff-2">开</label>$_select[sw_2_onoff_on]
					<label class="toggle-radio" for="toggle-sw-2-onoff-1">关</label>$_select[sw_2_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_2_pin" name="config[2][pin]" value="$_select[sw_2_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_2_cmd" name="config[2][command]" value="$_select[sw_2_cmd]">
			</div>

			<label class="control-label" for="sw_3_pin">Button 3</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-3-onoff-2">开</label>$_select[sw_3_onoff_on]
					<label class="toggle-radio" for="toggle-sw-3-onoff-1">关</label>$_select[sw_3_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_3_pin" name="config[3][pin]" value="$_select[sw_3_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_3_cmd" name="config[3][command]" value="$_select[sw_3_cmd]">
			</div>

			<label class="control-label" for="sw_4_pin">Button 4</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-4-onoff-2">开</label>$_select[sw_4_onoff_on]
					<label class="toggle-radio" for="toggle-sw-4-onoff-1">关</label>$_select[sw_4_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_4_pin" name="config[4][pin]" value="$_select[sw_4_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_4_cmd" name="config[4][command]" value="$_select[sw_4_cmd]">
			</div>

			<label class="control-label" for="sw_5_pin">Button 5</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-5-onoff-2">开</label>$_select[sw_5_onoff_on]
					<label class="toggle-radio" for="toggle-sw-5-onoff-1">关</label>$_select[sw_5_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_5_pin" name="config[5][pin]" value="$_select[sw_5_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_5_cmd" name="config[5][command]" value="$_select[sw_5_cmd]">
			</div>

			<label class="control-label" for="sw_6_pin">Button 6</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-6-onoff-2">开</label>$_select[sw_6_onoff_on]
					<label class="toggle-radio" for="toggle-sw-6-onoff-1">关</label>$_select[sw_6_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_6_pin" name="config[6][pin]" value="$_select[sw_6_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_6_cmd" name="config[6][command]" value="$_select[sw_6_cmd]">
			</div>

			<label class="control-label" for="sw_7_pin">Button 7</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-7-onoff-2">开</label>$_select[sw_7_onoff_on]
					<label class="toggle-radio" for="toggle-sw-7-onoff-1">关</label>$_select[sw_7_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_7_pin" name="config[7][pin]" value="$_select[sw_7_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_7_cmd" name="config[7][command]" value="$_select[sw_7_cmd]">
			</div>

			<label class="control-label" for="sw_8_pin">Button 8</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio" for="toggle-sw-8-onoff-2">开</label>$_select[sw_8_onoff_on]
					<label class="toggle-radio" for="toggle-sw-8-onoff-1">关</label>$_select[sw_8_onoff_off]
				</div>
				<span class="config-input-after">Pin</span>
				<input class="config-input-mini" type="number" min="2" max="27" id="sw_8_pin" name="config[8][pin]" value="$_select[sw_8_pin]">
				<span class="config-input-after">Cmd</span>
				<input class="config-input-large" type="text" id="sw_8_cmd" name="config[8][command]" value="$_select[sw_8_cmd]">
			</div>

			<label class="control-label" for="debounce">去抖(ms)</label>
			<div class="controls">
				<input class="hide" name="config[99][param]" value="bounce_time">
				<input class="config-input-medium" type="number" min="1" max="2000" id="debounce_time" name="config[99][value]" value="$_select[bounce_time]">
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-debounce" href="#notarget"><i class="fas fa-info-circle"></i></a>
				<span id="info-debounce" class="config-help-info">
					反弹时间(毫秒)。此参数用于在报告第一次更改后，忽略并轨时间的所有后续更改。
	            </span>
			</div>
		</div>
	</form>
</div>
</div>
